package com.example.mybatis_demo.controller;

import com.example.mybatis_demo.mapper.ArticleMapper;
import com.example.mybatis_demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-12-20
 * Time: 15:50
 */

@RestController
@RequestMapping("/wen")
public class ArticleController {
    @Autowired
    private ArticleMapper articleMapper;

    @RequestMapping("/id")
    private ArticleInfo getId(@Param("id") Integer id){
        return articleMapper.getAId(id);
    }

}
